// 该文件专门应用于创建整个应用的路由器
import VueRouter from "vue-router"
// 引入组件
import MyHome from '@/pages/MyHome'
import MyAbout from '@/pages/MyAbout'
import MyMessage from '@/pages/MyMessage'
import MyNews from '@/pages/MyNews'
import MyDetail from '@/pages/MyDetail'
// 创建一个路由器
export default new VueRouter({
  routes: [
    {
      name: 'guanyu',
      path: '/MyAbout',
      component: MyAbout,
    },
    {
      path: '/MyHome',
      component: MyHome,
      children: [
        {
          path: 'MyMessage',
          component: MyMessage,
          children: [
            {
              name: 'xiangqing',
              path: 'MyDetail',
              component: MyDetail,
            }
          ]
        },
        {
          path: 'MyNews',
          component: MyNews
        },
      ]
    },
  ]
})